﻿
@{
    ViewData["Title"] = "Index";
}

<h1>商品列表</h1>
<table class="table table-striped">
    <thead>
        <tr>
            <th>编号</th>
            <th>名称</th>
            <th>类别</th>
        </tr>
    </thead>
    <tbody>
        @foreach(var item in Model)
        {
        <tr>
            <td>@item.ProductId</td>
            <td>@item.ProductName</td>
            <td>@item.Category.CategoryName</td>
        </tr>
        }
    </tbody>
</table>

